cmake_minimum_required(VERSION 3.10)

project(opengl_engine)

add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/source-charset:utf-8>")

# set(GLFW_LIB 
# glfw3.lib

# )
include_directories(../../../packages/glm-0.9.9.8/glm)
include_directories(../../../packages/spdlog-1.x/include/)

# include_directories(../../../packages/imgui-1.88)
include_directories(../../../packages/imgui-docking)
set(IMGUI_SRC
../../../packages/imgui-docking/imgui.cpp
../../../packages/imgui-docking/imgui_demo.cpp
../../../packages/imgui-docking/imgui_draw.cpp
../../../packages/imgui-docking/imgui_tables.cpp
../../../packages/imgui-docking/imgui_widgets.cpp

../../../packages/imgui-docking/backends/imgui_impl_glfw.cpp
../../../packages/imgui-docking/backends/imgui_impl_opengl3.cpp
)

set(SRC 
../../../packages/glad/src/glad.c
../../../packages/stb_image/stb_image.cpp

src/main.cpp
src/application.cpp
src/log/log.cpp
src/window/window_glfw.cpp
src/render/render_system.cpp
src/render/scene2D.cpp
src/render/scene3D.cpp
src/entity/entity3D.cpp
# opengl inteface
src/opengl/opengl_buffer.cpp
src/opengl/opengl_texture.cpp

src/ui/imgui_manager.cpp

)

# 包含头文件
include_directories(include/)
# include_directories(include/imgui)
include_directories(src/)


# include_directories(packages/glfw-3.3.2/msvc/include)
# include_directories(packages/glad/include)
# 外部链接库
# link_directories(packages/glfw-3.3.2/msvc/lib/x64)

# link_libraries(${GLFW_LIB})

add_executable(engine 
${SRC} 
${IMGUI_SRC})

